package com.scujj.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@TableName("jjbb_user")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class User implements Serializable {
    @TableId(value = "id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;
    private String userName;
    private String password;
    private String phoneNumber;
    private String headImgSrc;
    private String gender;
    private Integer level;
    private String studentID;
    @JsonSerialize(using= ToStringSerializer.class)
    private Long money;
    @TableField(exist = false)
    private List<User> subcribeList;
    @TableField(exist = false)
    private List<User> fansList;
    @TableField(exist = false)
    private List<Blog> blogList;
    @TableField(exist = false)
    private List<Blog> thumbsUpBlogList;
    @TableField(exist = false)
    private List<Goods> goodsList;
    @TableField(exist = false)
    private List<Offer> offerList;
    @TableField(exist = false)
    private List<OrderGoods> orderGoodsList;
    @TableField(exist = false)
    private List<OrderOffer> orderOfferList;
    @TableField(exist = false)
    private List<ChatRecords> chatRecordsList;
}
